FIG. 1 shows, schematically, a conventional implementation 10 of software GPS. The GPS RF front end 11 receives NAVSTAR SPS GPS signals through its antenna and pre-processes them, typically by passive bandpass filtering in order to minimise out-of-band RF interference, preamplification, down conversion to an intermediate frequency (IF) and analogue to digital conversion. The resultant GPS signal samples are streamed out of the front end together with a corresponding sample clock signal to a microprocessor 12.
The GPS signal sample data is captured and stored in a system memory 13 for subsequent processing by the CPU. This is typically done by streaming the GPS signal samples in to a synchronous serial port 14, available on many microprocessors. The synchronous serial port de-serializes the data into words, e.g. typically 16 bit words, which are passed into a first in/first out (FIFO) buffer 15. A direct memory access (DMA) controller 16 is configured to take data from the FIFO and store it in system memory, being triggered by a request signal from the FIFO when a certain number of words have accumulated. The DMA transfer can be controlled by descriptors stored in memory that specify the data source and destination addresses, and the length of data to be transferred. By chaining descriptors together in a loop it is possible for the data to be captured in a ring buffer with no CPU intervention, which is an advantage in a portable system with relatively limited resources.
Software running on the CPU 17 is able to read the status of the DMA controller to determine how much data is in the ring-buffer and available for processing. By monitoring how many times the ring-buffer has been filled, it can also keep a cumulative count of the amount of data that has been captured at any moment, and hence the point in time represented by a given sample in memory. This information is critical to successful GPS decoding.
However, a problem occurs when the microprocessor clock speed is changed. This may happen frequently in a portable system as the clock speed is matched to the current processing requirement in order to conserve power. During the speed change, activity on the internal system bus including DMA transfer may be halted for over 100 microseconds, in order for integrated Phase-locked loops (PLL) to stabilize at the new frequency. The SSP will continue to receive data during this time and store it in the FIFO, but as no data is being removed from the FIFO it will eventually overflow and data will be lost. Furthermore it will not be possible to discover how much data has been lost, therefore the cumulative count of samples will become invalid. In this case the GPS decoding software may have to restart using the same algorithm as if it had just been activated, taking several seconds to acquire a new position fix.